// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DotNetFramework.CAP.Messages;
using DotNetFramework.CAP.Models;
using DotNetFramework.CAP.Persistence;

namespace DotNetFramework.CAP.Monitoring
{
    public interface IMonitoringApi
    {
        Task<CapPublishedMessage?> GetPublishedMessageAsync(long id);

        Task<CapReceivedMessage?> GetReceivedMessageAsync(long id);

        StatisticsDto GetStatistics();

        PagedQueryResult<MessageDto> Messages(MessageQueryDto queryDto);

        int PublishedFailedCount();

        int PublishedSucceededCount();

        int ReceivedFailedCount();

        int ReceivedSucceededCount();

        IDictionary<DateTime, int> HourlySucceededJobs(Messages.MessageType type);

        IDictionary<DateTime, int> HourlyFailedJobs(Messages.MessageType type);
    }
}